<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>知识库 - 源智库 SpringBase</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <style>
        :root {
            --primary-color: #0d6efd;
            --secondary-color: #6c757d;
            --bg-color: #f4f7fa;
            --sidebar-bg: #ffffff;
            --header-bg: #ffffff;
            --card-bg: #ffffff;
            --text-color: #212529;
            --text-muted-color: #6c757d;
            --border-color: #dee2e6;
        }

        body {
            background-color: var(--bg-color);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            font-size: 14px;
        }

        .wrapper {
            display: flex;
            min-height: 100vh;
        }

        .sidebar {
            width: 260px;
            background-color: var(--sidebar-bg);
            border-right: 1px solid var(--border-color);
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            z-index: 100;
        }
        
        .sidebar-header {
            padding: 1.5rem 1.5rem;
            display: flex;
            align-items: center;
        }
        
        .sidebar-header .logo-icon {
            font-size: 2rem;
            color: var(--primary-color);
            margin-right: 0.75rem;
            line-height: 1;
        }
        
        .sidebar-header .logo-text {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-color);
        }

        .sidebar-nav {
            padding: 0 1rem;
        }

        .nav-item {
            margin-bottom: 0.5rem;
        }

        .nav-link {
            display: flex;
            align-items: center;
            padding: 0.75rem 1rem;
            color: var(--text-muted-color);
            border-radius: 0.5rem;
            font-weight: 500;
        }

        .nav-link:hover {
            background-color: var(--bg-color);
            color: var(--primary-color);
        }

        .nav-link.active {
            background-color: var(--primary-color);
            color: #fff;
        }
        
        .nav-link i {
            margin-right: 1rem;
            font-size: 1.1rem;
        }

        .main-content {
            margin-left: 260px;
            width: calc(100% - 260px);
            display: flex;
            flex-direction: column;
        }

        .header {
            background-color: var(--header-bg);
            padding: 1rem 2rem;
            border-bottom: 1px solid var(--border-color);
        }

        .content {
            padding: 2rem;
        }

        .card {
            border: none;
            border-radius: 0.75rem;
            box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05);
        }
        
        .table-custom {
            font-size: 13px;
        }
        
        .table-custom th {
            font-weight: 600;
            color: var(--text-muted-color);
            background-color: var(--bg-color);
        }
        
        .table-custom td {
            vertical-align: middle;
        }
        
        .tag {
            background-color: var(--bg-color);
            color: var(--secondary-color);
            padding: 0.25rem 0.6rem;
            border-radius: 4px;
            font-size: 12px;
            margin-right: 0.5rem;
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <!-- Sidebar -->
        <nav class="sidebar">
            <div class="sidebar-header">
                <i class="bi bi-droplet-half logo-icon"></i>
                <a class="logo-text text-decoration-none" href="/platform">源智库 SpringBase</a>
            </div>
            
            <ul class="nav flex-column sidebar-nav">
                <li class="nav-item">
                    <a class="nav-link" href="/platform">
                        <i class="bi bi-grid-1x2-fill"></i>
                        <span>控制台</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/data-input">
                        <i class="bi bi-database-fill-add"></i>
                        <span>数据写入</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link active" href="/knowledge-base">
                        <i class="bi bi-book-fill"></i>
                        <span>知识库</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/applications">
                        <i class="bi bi-app-indicator"></i>
                        <span>智能应用</span>
                    </a>
                </li>
            </ul>
        </nav>

        <!-- Main Content -->
        <div class="main-content">
            <header class="header">
                 <h2 class="mb-0 fw-bold">知识库</h2>
            </header>

            <main class="content">
                <div class="card">
                    <div class="card-header bg-white d-flex flex-wrap align-items-center justify-content-between gap-2">
                        <div class="input-group" style="max-width: 400px;">
                            <span class="input-group-text bg-transparent border-end-0"><i class="bi bi-search"></i></span>
                            <input type="text" class="form-control border-start-0" placeholder="在知识库中搜索...">
                        </div>
                        <div class="d-flex gap-2">
                            <div class="dropdown">
                                <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown">
                                    类型: 全部
                                </button>
                                <ul class="dropdown-menu">
                                    <li><a class="dropdown-item" href="#">技术文档</a></li>
                                    <li><a class="dropdown-item" href="#">产品手册</a></li>
                                </ul>
                            </div>
                            <button class="btn btn-primary">
                                <i class="bi bi-plus-circle me-1"></i> 新建文档
                            </button>
                        </div>
                    </div>
                    <div class="card-body p-0">
                        <div class="table-responsive">
                            <table class="table table-hover table-custom mb-0">
                                <thead>
                                    <tr>
                                        <th>文档标题</th>
                                        <th>类型</th>
                                        <th>标签</th>
                                        <th>更新时间</th>
                                        <th>创建者</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><strong>API接口开发规范_v2.1</strong></td>
                                        <td>技术文档</td>
                                        <td><span class="tag">API</span><span class="tag">后端</span></td>
                                        <td>2024-05-20 10:30</td>
                                        <td>王五</td>
                                        <td>
                                            <a href="#" class="btn btn-sm btn-outline-secondary"><i class="bi bi-pencil-fill"></i></a>
                                            <a href="#" class="btn btn-sm btn-outline-danger"><i class="bi bi-trash-fill"></i></a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><strong>产品A用户手册</strong></td>
                                        <td>产品手册</td>
                                        <td><span class="tag">产品A</span></td>
                                        <td>2024-05-18 15:00</td>
                                        <td>李四</td>
                                        <td>
                                            <a href="#" class="btn btn-sm btn-outline-secondary"><i class="bi bi-pencil-fill"></i></a>
                                            <a href="#" class="btn btn-sm btn-outline-danger"><i class="bi bi-trash-fill"></i></a>
                                        </td>
                                    </tr>
                                    <!-- more rows -->
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="card-footer bg-white d-flex justify-content-between align-items-center">
                        <small class="text-muted">显示 1 到 10 条，共 56 条记录</small>
                        <nav>
                            <ul class="pagination pagination-sm mb-0">
                                <li class="page-item disabled"><a class="page-link" href="#">上一页</a></li>
                                <li class="page-item active"><a class="page-link" href="#">1</a></li>
                                <li class="page-item"><a class="page-link" href="#">2</a></li>
                                <li class="page-item"><a class="page-link" href="#">3</a></li>
                                <li class="page-item"><a class="page-link" href="#">下一页</a></li>
                            </ul>
                        </nav>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html> 